# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=conpot
pkgver=0.6.0
_pyver=3.13
pkgrel=13
pkgdesc='ICS honeypot with the goal to collect intelligence about the motives and methods of adversaries targeting industrial control systems.'
url='https://pypi.org/project/Conpot/'
groups=('blackarch' 'blackarch-honeypot')
depends=('python-gevent' 'python-pysnmp' 'python-pysmi' 'python-lxml'
         'python-bottle' 'python-jinja' 'python-beautifulsoup4'
         'python-requests' 'python-sphinx' 'python-libtaxii' 'python-xlrd'
         'python-crc16' 'python-natsort' 'python-scapy' 'python-enum-compat'
         'hpfeeds' 'python-modbus-tk' 'python-stix-validator'
         'python-stix' 'python-crypto' 'python-cybox' 'python-cybox'
         'python-pyghmi' 'python-mixbox' 'python-cpppo' 'python-pytest'
         'python-fs' 'python-slugify' 'python-tftpy' 'python-freezegun'
         'python-tox' 'python-weakrefmethod')
makedepends=('python' 'python-distribute' 'python-setuptools')
license=('GPL2')
arch=('any')
source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz")
sha512sums=('ed0246d68c3cb8a8e108e8a64e109ebfc62df90ca01343cda41cd4d05a972b23f6ec8d8ddf23696fbe38d554c5f1e819e6525075dde265c71617ab7549e74ef2')

build() {
  cd "$pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  mv "$pkgdir/usr/lib/python$_pyver/site-packages/bin" \
    "$pkgdir/usr/lib/python$_pyver/site-packages/$pkgname/"
}

